Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sequence] Sequence Package #76

Merged
merged 5 commits into from
Nov 27, 2024
Merged

[Sequence] Sequence Package #76

merged 5 commits into from
Nov 27, 2024

Conversation

quangquandev
Copy link
Collaborator

@quangquandev quangquandev commented Nov 27, 2024

Sequence Feature:

  • Fiscal Year Rotation: Allows users to define any month as the starting month of the fiscal year for sequence rotation.
  • Fiscal Year Rotation Based on Registration Date: The fiscal year is determined by the registration date in the master data, if available.

Detail Processing:

  1. Retrieve Master Data:

    • Fetch master data from the table based on tenantCode and code1 from the parameters.
    • If no tenantCode is provided, use the default value "single".
    • Use default data if no corresponding master data is found.
    {
       "typeCode": "sequence",
       "format": "%%no%%"
     }
  2. Sequence Calculation:

    • Calculate the no, formattedNo, IssueAt, and Id, then return the result to the user.
  3. Rotation Logic:

    • If rotateBy is fiscal_yearly: Reset the sequence to 1 when the fiscal year changes.
    • If rotateBy is yearly: Reset the sequence to 1 when the calendar year changes.
    • If rotateBy is monthly: Reset the sequence to 1 when the calendar month changes.
    • If rotateBy is daily: Reset the sequence to 1 when the calendar day changes.
    • If rotateBy is none: The sequence does not reset.

Related

Documentation

@quangquandev quangquandev self-assigned this Nov 27, 2024
@koichimurakami koichimurakami merged commit 0831f5f into develop Nov 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants